package com.joymart.admin.rest;
import com.joymart.common.utils.SecurityUtils;
import com.joymart.user.model.BusinessRole;
import com.joymart.user.service.UserHealthReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/admin")
public class UserHealthReportAdminController {

    @Autowired
    private UserHealthReportService userHealthReportService;

    @GetMapping("/healthReports/{id}")
    public Object getHealthReport(@PathVariable String id){
        SecurityUtils.requiresRestAuthority("HealthConsult");
        return userHealthReportService.findByUserId(id);
    }
}
